f = open("Files/score.csv", "r", encoding="utf-8")
ls1, ls2 = [], []
for item in f:
    item = item.replace("\n", "")
    ls1.append(item.split(","))
f.close()
for i in range(7):
    ls, s = [], 0
    for j in range(5):
        ls.append(ls1[i][j])
        s += int(ls1[i][j]) if i and j != 0 else s
    ls.append("总分") if i == 0 else ls.append(str(s))
    ls2.append(ls)
f = open("Files/count.csv", "w", encoding="utf-8")
for item1 in ls2:
    for item2 in item1:
        f.write(item2 + ',')
    f.write("\n")
f.close()
